/* 输入框容器聚焦样式优化 - 确保整体高亮连贯 */
.ant-input-affix-wrapper-lg {
    height: 48px;
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0 16px;
    transition: all 0.3s ease; /* 添加过渡动画 */
}

/* 👇 新增：解决浏览器自动填充白色背景问题 */
/* 覆盖自动填充状态的输入框容器样式 */
.ant-input-affix-wrapper-lg:-webkit-autofill,
.ant-input-affix-wrapper-lg:-webkit-autofill:hover,
.ant-input-affix-wrapper-lg:-webkit-autofill:focus {
    /* 用阴影覆盖自动填充背景（与原背景色一致） */
    box-shadow: 0 0 0px 1000px rgba(255, 255, 255, 0.05) inset !important;
    /* 强制文字颜色为白色 */
    -webkit-text-fill-color: white !important;
    /* 保持原有边框和背景样式 */
    background-color: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* 覆盖自动填充状态的内部输入框样式 */
.ant-input-affix-wrapper-lg .ant-input:-webkit-autofill,
.ant-input-affix-wrapper-lg .ant-input:-webkit-autofill:hover,
.ant-input-affix-wrapper-lg .ant-input:-webkit-autofill:focus {
    box-shadow: 0 0 0px 1000px transparent inset !important;
    -webkit-text-fill-color: white !important;
    background-color: transparent !important;
}
/* 👆 新增结束 */

/* 聚焦状态完整高亮效果 */
.ant-input-affix-wrapper-lg.ant-input-affix-wrapper-focused {
    border-color: #3B82F6 !important; /* 完整边框高亮 */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) !important; /* 整体发光效果 */
    background-color: rgba(255, 255, 255, 0.08) !important;
    border-width: 1px; /* 确保边框宽度一致 */
}

/* 内部输入框样式 - 完全透明，不单独显示高亮 */
.ant-input-affix-wrapper-lg .ant-input {
    background-color: transparent !important;
    color: white;
    border: none !important;
    box-shadow: none !important;
    height: 100%;
    padding: 0 !important; /* 移除内部padding，避免内容偏移 */
    margin: 0 !important;
}

/* 修复前缀图标区域的聚焦一致性 */
.ant-input-affix-wrapper-lg .ant-input-prefix {
    margin-right: 12px; /* 统一图标与输入内容间距 */
}

.ant-input-lg::placeholder,
.ant-input-affix-wrapper-lg::placeholder,
.ant-input-affix-wrapper-lg .ant-input::placeholder {
    color: rgba(226, 232, 240, 0.5) !important;
}

/* 非聚焦状态样式强化 - 确保初始状态与聚焦状态过渡自然 */
.ant-input-affix-wrapper-lg:not(.ant-input-affix-wrapper-focused):not(.ant-input-affix-wrapper-disabled) {
    border-color: rgba(255, 255, 255, 0.1);
}

/* 其他保持不变的核心样式... */
.login-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #3B0764 100%);
}

.particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.8;
}

.light-effect {
    position: absolute;
    top: -30%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle at 30% 40%, rgba(124, 58, 237, 0.25) 0%, rgba(59, 130, 246, 0.1) 60%, transparent 80%);
    animation: rotateLight 15s linear infinite;
    z-index: 1;
    filter: blur(80px);
}

.light-effect::after {
    content: '';
    position: absolute;
    bottom: -40%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle at 70% 60%, rgba(56, 189, 248, 0.2) 0%, transparent 70%);
    filter: blur(60px);
}

@keyframes rotateLight {
    from { transform: rotate(0deg) scale(1); }
    to { transform: rotate(360deg) scale(1.1); }
}

.login-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    position: relative;
    z-index: 2;
}

.login-header {
    text-align: center;
    margin-bottom: 40px;
    text-shadow: 0 0 15px rgba(56, 189, 248, 0.3);
}

.login-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    border-radius: 16px;
    margin-right: 16px;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.logo-icon svg {
    font-size: 32px;
    color: white;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.6));
}

.login-header h1 {
    color: white;
    font-size: 28px;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.5px;
}

.login-desc {
    color: rgba(226, 232, 240, 0.8);
    font-size: 16px;
    margin-top: 10px;
}

.login-form {
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(15px);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.5s ease-in-out;
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.login-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #3B82F6, transparent);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
        box-shadow: 0 0 0 rgba(59, 130, 246, 0);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        box-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    }
}

.login-btn {
    height: 48px;
    font-size: 16px;
    border-radius: 8px;
    background: linear-gradient(90deg, #3B82F6 0%, #8B5CF6 100%);
    border: none;
    transition: all 0.3s ease;
    width: 100%;
    display: block;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
            to right,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent
    );
    transform: rotate(30deg);
    animation: shine 3s infinite;
}

@keyframes shine {
    0% { transform: translateX(-100%) rotate(30deg); }
    100% { transform: translateX(100%) rotate(30deg); }
}

.login-btn:hover,
.login-btn:focus {
    background: linear-gradient(90deg, #4F94FC 0%, #A78BFA 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.5);
    border: none;
}

.login-extra {
    text-align: center;
    margin-top: 20px;
}

.login-extra a {
    color: rgba(226, 232, 240, 0.7);
    transition: all 0.3s;
    margin: 0 8px;
}

.login-extra a:hover {
    color: #3B82F6;
    text-decoration: none;
    text-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.login-footer {
    padding: 20px;
    text-align: center;
    color: rgba(226, 232, 240, 0.5);
    font-size: 14px;
    position: relative;
    z-index: 2;
}

.ant-form-item {
    margin-bottom: 24px;
}

.ant-input-affix-wrapper-lg .anticon {
    color: rgba(226, 232, 240, 0.7);
}

.ant-checkbox-wrapper {
    color: rgba(226, 232, 240, 0.7);
    font-size: 14px;
}

.ant-checkbox-checked .ant-checkbox-inner {
    background-color: #3B82F6;
    border-color: #3B82F6;
    box-shadow: 0 0 8px rgba(59, 130, 246, 0.4);
}

.ant-form-item-explain-error {
    margin-top: 4px;
    color: #F87171;
    text-shadow: 0 0 2px rgba(248, 113, 113, 0.3);
}

@media (max-width: 768px) {
    .login-form {
        padding: 30px 20px;
        margin: 0 15px;
    }

    .light-effect {
        width: 500px;
        height: 500px;
    }
}

/* 👇 替换之前的自动填充样式，使用更精确的选择器 */
/* 覆盖Ant Design输入框容器的自动填充样式（包括所有状态） */
.ant-input-affix-wrapper-lg:-webkit-autofill,
.ant-input-affix-wrapper-lg:-webkit-autofill:hover,
.ant-input-affix-wrapper-lg:-webkit-autofill:focus,
.ant-input-affix-wrapper-lg.ant-input-affix-wrapper-focused:-webkit-autofill {
    /* 核心：用阴影强制覆盖背景，优先级高于浏览器默认 */
    box-shadow: 0 0 0 999px rgba(255, 255, 255, 0.05) inset !important;
    /* 强制文字颜色 */
    -webkit-text-fill-color: white !important;
    /* 防止背景色被覆盖 */
    background-color: rgba(255, 255, 255, 0.05) !important;
    background-clip: content-box !important; /* 限制背景绘制区域 */
    /* 保持边框样式一致 */
    border-color: rgba(255, 255, 255, 0.1) !important;
    transition: background-color 5000s ease-in-out 0s !important; /* 延迟背景色变化 */
}

/* 专门处理密码框的自动填充（Ant Design密码框有特殊结构） */
.ant-input-affix-wrapper-lg.ant-input-password:-webkit-autofill,
.ant-input-affix-wrapper-lg.ant-input-password:-webkit-autofill:hover,
.ant-input-affix-wrapper-lg.ant-input-password:-webkit-autofill:focus {
    box-shadow: 0 0 0 999px rgba(255, 255, 255, 0.05) inset !important;
    -webkit-text-fill-color: white !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
}

/* 覆盖内部输入框的自动填充样式（针对密码框内部输入区域） */
.ant-input-affix-wrapper-lg .ant-input:-webkit-autofill,
.ant-input-affix-wrapper-lg .ant-input-password-input:-webkit-autofill {
    box-shadow: 0 0 0 999px transparent inset !important;
    -webkit-text-fill-color: white !important;
    background-color: transparent !important;
    background-clip: content-box !important;
}

/* 聚焦状态下的自动填充样式补充 */
.ant-input-affix-wrapper-lg.ant-input-affix-wrapper-focused:-webkit-autofill {
    border-color: #3B82F6 !important; /* 保持聚焦时的蓝色边框 */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25) inset,
    0 0 0 999px rgba(255, 255, 255, 0.05) inset !important;
}

/* 修复自动填充时的白色背景问题 */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.05) inset !important;
    box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.05) inset !important;
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* 确保密码输入框也被正确设置 */
.ant-input-password input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.05) inset !important;
    box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.05) inset !important;
}

/* 保持聚焦时的样式一致性 */
.ant-input-affix-wrapper-focused input:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.08) inset !important;
    box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.08) inset !important;
}